<template>
  <el-row>
    <el-col :span="11">
      <el-breadcrumb separator="/" style="margin: 0 0 20px 0">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>用户</el-breadcrumb-item>
      </el-breadcrumb>

      <el-input placeholder="请输入名称" size="small" style="width: 40%"></el-input>
      <el-button type="primary" size="small">搜索</el-button>
    </el-col>
    <el-col :span="11" >
      <h1>用户</h1>
    </el-col>
    <el-col :span="24" style="margin:  10px 0 3% 0">
      <el-table
        :data="yhData"
        :default-sort = "{prop: 'date', order: 'descending'}"
        style="width: 100%;">
        <el-table-column
          type="selection"
          width="55">
        </el-table-column>
        <el-table-column
          prop="date"
          label="用户ID">
        </el-table-column>
        <el-table-column
          prop="name"
          label="昵称">
        </el-table-column>
        <el-table-column
          prop="name"
          label="性别">
        </el-table-column>
        <el-table-column
          prop="address"
          label="联系电话">
        </el-table-column>
        <el-table-column
          prop="name"
          label="国家">
        </el-table-column>
        <el-table-column
          prop="name"
          label="省份">
        </el-table-column>
        <el-table-column
          prop="name"
          label="城市">
        </el-table-column>
        <el-table-column
          fixed="right"
          label="操作">
          <template slot-scope="scope">
            <el-button @click="dialogFormLook = true" type="text" size="small">查看</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-col>

    <el-col :span="24" style="text-align: center">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage4"
        :page-sizes="[100, 200, 300, 400]"
        :page-size="100"
        layout="total, sizes, prev, pager, next, jumper"
        :total="400">
      </el-pagination>
      <el-dialog title="查看用户" :visible.sync="dialogFormLook">
        <el-form :model="formLook" style="width: 80%">
          <el-form-item label="用户ID :" label-width="20%">
            <el-input v-model="formLook.name"></el-input>
          </el-form-item>
          <el-form-item label="昵称 :" label-width="20%">
            <el-input v-model="formLook.name"></el-input>
          </el-form-item>
          <el-form-item label="性别 :" label-width="20%">
            <el-input v-model="formLook.name"></el-input>
          </el-form-item>
          <el-form-item label="联系电话 :" label-width="20%">
            <el-input v-model="formLook.name"></el-input>
          </el-form-item>
          <el-form-item label="地址 :" label-width="20%">
            <el-input v-model="formLook.name">
            </el-input>
          </el-form-item>

        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogFormLook = false">取 消</el-button>
          <el-button type="primary" @click="dialogFormLook = false">确 定</el-button>
        </div>
      </el-dialog>

    </el-col>
  </el-row>
</template>

<script>
  export default {
    data() {
      return {
        dialogFormLook:false,
        currentPage4:1,
        formLook:{
          name:'',
        },
        yhData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        },
          {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄'
          },
          {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄'
          },
          {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄'
          }]
      }
    },
    methods: {
      handleSizeChange(val) {
      },
      handleCurrentChange(val) {
      }
    },
  }
</script>

<style scoped>

</style>
